/**
 *autho xf
 * */
function  SureWebName(){
    var realname    = $("#realname").val();
    var idcard      = $("#idcard").val();
    var banck       = $("#banck").val();
    var phone       = $("#phone").val();
    if (realname == '' || realname == null) {
        alert("真实姓名不能为空");
        return false;
    }
    if (!/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(idcard) ) {
        alert("身份证格式不对，请重填");
        return false;
    }
    if (!/^(\d{16}|\d{19})$/.test(banck)) {
        alert("银行卡号格式不对，请重填");
        return false;
    }
    if (!(/^1(3|4|5|7|8)\d{9}$/.test(phone))) {
        alert("请输入正确的手机号码");
        return false;
    }
    $.ajax({
        url: 'webauth_name.html',
        type: "post",
        data: {realname: realname, idcard: idcard, banck: banck, phone: phone},
        dataType: "json",
        timeout: 30000,
        success: function (json) {
            if (json.code == 1) {//ok
                alert(json.mess);
                window.location.href = "/Web/webauth_namesucess.html";
            }
            if (json.code == 2) {//ok
                alert(json.mess);
            }
        }
    });

}


